home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / AmigaTalk / Intuition / Colors.st < prev    next >
Text File  |  2000-05-07  |  1KB  |  40 lines

  1. "------------------------------------------------------------------"
  2. " Colors Class implements control of Amiga Color registers         "
  3. " Chances are that Glyph is the wrong parent class for this class. "
  4. "------------------------------------------------------------------"
  5.  
  6. Class Colors :Glyph
  7. ! value mapName wName !
  8. [
  9.    make: colorMapName size: numColors
  10.       <primitive 184 1 colorMapName numColors>.
  11.       mapName <- colorMapName
  12. |
  13.    dispose
  14.       <primitive 184 0 mapName>
  15. |
  16.    loadColors: howMany from: colorMapFileName
  17.       <primitive 184 2 wName howMany colorMapFileName>
  18. |
  19.    getColor: sourceType from: sourceName which: n
  20.       ^ value <- <primitive 184 3 sourceType sourceName n>
  21. |
  22.    setWindowColorReg: n red: r green: g blue: b
  23.       <primitive 184 4 wName n r g b>
  24. |
  25.    setMapValue: sourceType from: source num: n red: r green: g blue: b
  26.       <primitive 184 5 sourceType source n r g b>
  27. |
  28.    copyMap: source to: dest sourceType: type
  29.       <primitive 184 6 source dest type>
  30. |
  31.    saveColorsTo: colorMapFileName
  32.       <primitive 184 7 wName colorMapFileName>
  33.    new: windowTitle
  34.       wName   <- windowTitle.
  35.       mapName <- nil.
  36.       value   <- 0.
  37.       ^ self
  38. ]
  39.